package com.seeingtv.job;

import com.dangdang.ddframe.job.api.ShardingContext;
import com.dangdang.ddframe.job.api.simple.SimpleJob;

/**
 * @author hubert
 * @date 2018/5/17
 * @description MyElasticJob
 */
public class MyElasticJob implements SimpleJob {

	@Override
	public void execute(ShardingContext context) {
		switch (context.getShardingItem()) {
			case 0:
				System.out.println("do something by sharding item 0");
				break;
			case 1:
				System.out.println("do something by sharding item 1");
				break;
			case 2:
				System.out.println("do something by sharding item 2");
				break;
			 default:
		}
	}
}
